<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  const url = "http://10.11.55.86:3000/login?username=admin&password=123456";

  const xhr = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
  xhr.open("get", url, true);
  // 配置超时时间
  xhr.timeout = 10;
  xhr.onload = function(){
    if(xhr.status === 200){
      console.log("请求成功")
    }
  }
  // 绑定超时事件
  xhr.ontimeout = function(){
    console.log("请求超时")
  }
  // 绑定中断事件
  xhr.onabort = function(){
    console.log("请求被中断")
  }
  xhr.send();
  setTimeout(()=>{
    // 执行中断方法
    xhr.abort();
  }, 9);




  "http://10.11.55.86:3000/login?username=admin&password=123456&_qft_=" + Date.now() + "" + Math.random();
  "http://10.11.55.86:3000/login?username=admin&password=123456&_qft_=" + Date.now() + "" + Math.random();
  
</script>
</html>